<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
    
    <head>
        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
        </script>
        <script>
            dojo.require("dijit.form.Form");
            dojo.require("dijit.form.Button");
            dojo.require("dijit.form.ValidationTextBox");
            dojo.require("dijit.form.DateTextBox");

            function sendForm(){
		var res = dojo.byId("formResp");

		dojo.xhrPost({
			url: "addteam.php",
			form: dojo.byId("myForm"),
			load: function(content){
				dojo.style(res,"display","block");
				res.innerHTML = content;
			},
			error: function(){
				res.innerHTML = "Your form could not be sent";
			}
		});
	   }
        </script>
        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"
        />
    </head>
    
    <body class=" claro ">
        <div dojoType="dijit.form.Form" id="myForm" jsId="myFormTwo" encType="multipart/form-data"
        action="" method="">
            <table style="border: 1px solid #9f9f9f;" cellspacing="10">
                <tr>
                    <td>
                        <label for="name">
                            Name:
                    </td>
                    <td>
                        <input type="text" name="name" required="false" dojoType="dijit.form.ValidationTextBox"
                        />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="dob">
                            Last Name:
                    </td>
                    <td>
                        <input type="text" name="lname" required="false" dojoType="dijit.form.ValidationTextBox"
                    </td>
                </tr>
            </table>
            <button dojoType="dijit.form.Button" onClick="console.log(myFormTwo.attr('value'))">
                Get Values from form!
            </button>
            <button dojoType="dijit.form.Button" onClick="sendForm();" type="submit" name="submitButtonTwo"
            value="Submit">
                Submit
            </button>
        
        </div>
     
    </body>

</html>
